package com.yc.baseapi;

/**
 * Created with IntelliJ IDEA.
 * description:
 * author: yc
 * date: 2021/5/20 10:52
 */
public class TestException {
    public void m1() {
//        throw new RuntimeException("aaaa");
        throw new RuntimeException();
    }

    public void m2() {

        try {
             this.m1();
        } catch (Exception e) {
            System.out.println("m1报错：" + e.getMessage());
        }
    }

    public static void main(String[] args) {
        TestException te = new TestException();
        te.m2();
    }

}
